﻿using HupunSDK_API.Response;
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;

namespace HupunSDK_API.Models
{
    public class HupunQueryTradeResponse : HupunResponse
    {
        [JsonIgnore]
        private List<TradeModel> tradeModels = null;

        [JsonIgnore]
        public List<TradeModel> TradeModels
        {
            get
            {
                if(tradeModels == null)
                {
                    tradeModels = JsonConvert.DeserializeObject<List<TradeModel>>(this.Data);
                }
                return tradeModels;
            }
            set { tradeModels = value; }
        }
    }

    public class OrdersItem
    {
        /// <summary>
        /// 酒石酸美托洛尔片(倍他乐克)111234
        /// </summary>
        public string item_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string sku_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int size { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int price { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string is_package { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int receivable { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int payment { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tp_tid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int oln_status { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string oln_sku_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int status { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string order_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string oln_item_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int has_refund { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tp_oid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int is_gift { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string item_platform_url { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tid_snapshot { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int tax_rate { get; set; }
    }

    public class TradeModel
    {
        /// <summary>
        /// 
        /// </summary>
        public string uid { get; set; }
        /// <summary>
        /// 狮子的真实有赞店铺
        /// </summary>
        public string shop_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string shop_nick { get; set; }
        /// <summary>
        /// 上海起鑫(微装) 
        /// </summary>
        public string storage_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string storage_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string trade_no { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string buyer_msg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string seller_msg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int oln_status { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string buyer_account { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string buyer { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string receiver { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string phone { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string country { get; set; }
        /// <summary>
        /// 北京
        /// </summary>
        public string province { get; set; }
        /// <summary>
        /// 北京市
        /// </summary>
        public string city { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string district { get; set; }
        /// <summary>
        /// 西*
        /// </summary>
        public string address { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string zip { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int create_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int modify_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int pay_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int status { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string is_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<OrdersItem> orders { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string is_exception_trade { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tp_tid { get; set; }
        /// <summary>
        /// 有赞
        /// </summary>
        public string source_platform { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int sum_sale { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int post_fee { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int paid_fee { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int discount_fee { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int service_fee { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int has_refund { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<string> oln_order_list { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string is_small_trade { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tel { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int process_status { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string logistic_code { get; set; }
        /// <summary>
        /// 圆通
        /// </summary>
        public string logistic_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string channel_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int trade_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mark { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string currency_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int currency_sum { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int weight { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int volume { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int tp_logistics_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int post_cost { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string exchange_trade { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string split_trade { get; set; }
    }
}
